/* Yet Another Experimental Software Renderer
 *
 * Copyright (c) 2010 Pawel "Hery" Dziepak
 */

#ifndef TEXTURE_SAMPLER_H_
#define TEXTURE_SAMPLER_H_

#include "texture.h"

namespace yaesr {
	class texture_sampler {
	public:
		texture_sampler(texture *ctex) : tex(ctex) { }

		virtual color get_color(vec2 coord) = 0;

	protected:
		texture *tex;
	};

	class point_sampler : public texture_sampler {
	public:
		point_sampler(texture *ctex) : texture_sampler(ctex) {}

		color get_color(vec2 coord);
	};

	class bilinear_sampler : public texture_sampler {
	public:
		bilinear_sampler(texture *ctex) : texture_sampler(ctex) {}

		color get_color(vec2 coord);
	};
}

#endif